翻訳と辞書
Words near each other
・ Continental Chile
・ Continental Circus
・ Continental Circus (album)
・ Continental Circus Berlin
・ Continental Classics
・ Continental Clay Brick Plant
・ Continental collision
・ Continental Congress
・ Continental Connection
・ Continental Copters
・ Continental Copters El Tomcat
・ Continental Copters Jet-Cat
・ Context-based model of minimal counterintuiveness
・ Context-dependent memory
・ Context-free grammar
Context-free language
・ Context-sensitive
・ Context-sensitive grammar
・ Context-sensitive half-life
・ Context-sensitive help
・ Context-sensitive language
・ Context-sensitive solutions (transport)
・ Context-sensitive user interface
・ ConTextos
・ Contexts
・ Contextual
・ Contextual advertising
・ Contextual application design
・ Contextual deep link
・ Contextual design


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Context-free language : ウィキペディア英語版
Context-free language

In formal language theory, a context-free language (CFL) is a language generated by some context-free grammar (CFG). Different CF grammars can generate the same CF language. It is important to distinguish properties of the language (intrinsic properties) from properties of a particular grammar (extrinsic properties).
The set of all context-free languages is identical to the set of languages accepted by pushdown automata, which makes these languages amenable to parsing. Indeed, given a CFG, there is a direct way to produce a pushdown automaton for the grammar (and corresponding language), though going the other way (producing a grammar given an automaton) is not as direct.
Context-free languages have many applications in programming languages; for example, the language of all properly matched parentheses is generated by the grammar S\to SS ~|~ (S) ~|~ \varepsilon. Also, most arithmetic expressions are generated by context-free grammars.
==Examples==
An archetypal context-free language is L = \, the language of all non-empty even-length strings, the entire first halves of which are a's, and the entire second halves of which are b's. L is generated by the grammar S\to aSb ~|~ ab.
This language is not regular.
It is accepted by the pushdown automaton M=(\, \, \, \delta, q_0, z, \) where \delta is defined as follows:〔meaning of \delta's arguments and results: \delta(\mathrm_1, \mathrm, \mathrm) = (\mathrm_2, \mathrm)

\delta(q_0, a, z) = (q_0, az)
\delta(q_0, a, a) = (q_0, aa)
\delta(q_0, b, a) = (q_1, \varepsilon)
\delta(q_1, b, a) = (q_1, \varepsilon)

Unambiguous CFLs are a proper subset of all CFLs: there are inherently ambiguous CFLs. An example of an inherently ambiguous CFL is the union of \ with \. This set is context-free, since the union of two context-free languages is always context-free. But there is no way to unambiguously parse strings in the (non-context-free) subset \ which is the intersection of these two languages.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Context-free language」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.